import com.gxa.utils.DateUtils;
import org.junit.Test;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author: fxr
 * @Date: 2021/12/8
 * @Description:
 */
public class MyTest {
    @Test
    public  void ll() throws ParseException {
        String s="2021-12-08 10:41:19";
//        Date updateDate = DateUtils.string2Date(s);
//        System.out.println(updateDate);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date updateDate = sdf.parse(s);
        System.out.println(updateDate);

        String sa= DateUtils.date2String(updateDate,"yyyy-MM-dd HH:mm:ss");
        System.out.println(sa);
    }
}
